<template>
  <div>

    <h2>nowrap (默认)</h2>
    <div class="flex-container nowrap">
      <div class="flex-item">1</div>
      <div class="flex-item">2</div>
      <div class="flex-item">3</div>
      <div class="flex-item">4</div>
      <div class="flex-item">5</div>
    </div>

    <h2>wrap</h2>
    <div class="flex-container wrap">
      <div class="flex-item">1</div>
      <div class="flex-item">2</div>
      <div class="flex-item">3</div>
      <div class="flex-item">4</div>
      <div class="flex-item">5</div>
    </div>

    <h2>wrap-reverse</h2>
    <div class="flex-container wrap-reverse">
      <div class="flex-item">1</div>
      <div class="flex-item">2</div>
      <div class="flex-item">3</div>
      <div class="flex-item">4</div>
      <div class="flex-item">5</div>
    </div>

  </div>
</template>

<script>
export default {
  name: ""
}
</script>

<style lang="less" scoped>
.flex-container {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: stretch;
  margin-bottom: 20px;
  width: 200px;
  padding: 10px;
  border: 1px solid #000;
}

.flex-item {
  flex: 0 0 50px;
  height: 50px;
  margin: 5px;
  background-color: #999;
  color: #fff;
  text-align: center;
  line-height: 50px;
  border: 1px solid #666;
}

.nowrap {
  flex-wrap: nowrap;
}

.wrap {
  flex-wrap: wrap;
}

.wrap-reverse {
  flex-wrap: wrap-reverse;
}
</style>
